import xhr from './index.js';
import API from './apiConfig.js';

/**
 * 获取账单详情 
 * @returns {Promise} - 返回一个 Promise 对象，表示账单详情
 */
export async function getDetailList(data) {
	try {
		const response = await xhr.get(API.detail.list, data);
		return response.data;
	} catch (error) {
		throw error;
	}
}
/**
 * 创建账单详情 
 * @returns {Promise} - 返回一个 Promise 对象，表示账单详情
 */
export async function createDetail(data) {
	try {
		const response = await xhr.post(API.detail.create, data);
		return response.data;
	} catch (error) {
		throw error;
	}
}